// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie.core.skinnedmodel.advancedanimation;

import zombie.asset.Asset;
import zombie.asset.AssetManager;
import zombie.asset.AssetPath;

public class AnimNodeAssetManager extends AssetManager {
    public static final AnimNodeAssetManager instance = new AnimNodeAssetManager();

    @Override
    protected void startLoading(Asset asset) {
        AnimNodeAsset animNodeAsset = (AnimNodeAsset)asset;
        animNodeAsset.m_animNode = AnimNode.Parse(asset.getPath().getPath());
        if (animNodeAsset.m_animNode == null) {
            this.onLoadingFailed(asset);
        } else {
            this.onLoadingSucceeded(asset);
        }
    }

    @Override
    public void onStateChanged(Asset.State old_state, Asset.State new_state, Asset asset) {
        super.onStateChanged(old_state, new_state, asset);
        if (new_state == Asset.State.READY) {
        }
    }

    @Override
    protected Asset createAsset(AssetPath assetPath, AssetManager.AssetParams var2) {
        return new AnimNodeAsset(assetPath, this);
    }

    @Override
    protected void destroyAsset(Asset var1) {
    }
}
